﻿namespace ctolua.Models.Expand
{
    /// <summary>
    /// 镜头拓展
    /// </summary>
    public static class ECamera
    {
        /// <summary>
        /// 线性移动镜头(时间)
        /// </summary>
        /// <param name="role ">  玩家   </param>
        /// <param name="point ">  点   </param>
        /// <param name="duration ">  持续时间   </param>
        /// <param name="acc ">  加速度   </param>
        public static void camera_linear_move_duration(this Role role, Point point, Fix32 duration, int? acc) => game_api.camera_linear_move_duration(role, point, duration, acc);

        /// <summary>
        /// 线性移动镜头(初速度)
        /// </summary>
        /// <param name="role ">  玩家   </param>
        /// <param name="point ">  点   </param>
        /// <param name="speed ">  初速度   </param>
        /// <param name="acc ">  加速度   </param>
        public static void camera_linear_move_speed(this Role role, Point point, Fix32 duration, int? acc) => game_api.camera_linear_move_speed(role, point, duration, acc);

        /// <summary>
        /// 让镜头看向某点（镜头位置不变）
        /// </summary>
        /// <param name="role ">  玩家   </param>
        /// <param name="point ">  点   </param>
        /// <param name="move_time ">  时间   Fix32(0.0)</param>
        public static void camera_look_at(this Role role, Point point, Fix32 move_time) => game_api.camera_look_at(role, point, move_time);

        /// <summary>
        /// 设置镜头参数roll
        /// </summary>
        /// <param name="role ">  玩家   </param>
        /// <param name="roll ">  滚动角   </param>
        /// <param name="move_time ">  时间   Fix32(0.0)</param>
        public static void camera_set_param_roll(this Role role, Fix32 roll, Fix32 move_time) => game_api.camera_set_param_roll(role, roll, move_time);

        /// <summary>
        /// 设置镜头参数pitch
        /// </summary>
        /// <param name="role ">  玩家   </param>
        /// <param name="pitch ">  俯仰角   </param>
        /// <param name="move_time ">  时间   Fix32(0.0)</param>
        public static void camera_set_param_pitch(this Role role, Fix32 pitch, Fix32 move_time) => game_api.camera_set_param_pitch(role, pitch, move_time);

        /// <summary>
        /// 设置镜头参数yaw
        /// </summary>
        /// <param name="role ">  玩家   </param>
        /// <param name="yaw ">  导航角   </param>
        /// <param name="move_time ">  时间   Fix32(0.0)</param>
        public static void camera_set_param_yaw(this Role role, Fix32 pitch, Fix32 move_time) => game_api.camera_set_param_yaw(role, pitch, move_time);
        /// <summary>
        /// 设置镜头角度参数
        /// </summary>
        /// <param name="role ">  玩家   </param>
        /// <param name="rotate_type ">  角度类型   </param>
        /// <param name="angle ">  角度值   </param>
        /// <param name="move_time ">  时间   Fix32(0.0)</param>
        public static void camera_set_param_rotate(this Role role, int? rotate_type, Fix32 angle, Fix32 move_time) => game_api.camera_set_param_rotate(role, rotate_type, angle, move_time);

        /// <summary>
        /// 设置镜头参数distance
        /// </summary>
        /// <param name="role ">  玩家   </param>
        /// <param name="distance ">  焦点距离   </param>
        /// <param name="move_time ">  时间   Fix32(0.0)</param>
        public static void camera_set_param_distance(this Role role, Fix32 distance, Fix32 move_time) => game_api.camera_set_param_distance(role, distance, move_time);
        /// <summary>
        /// 旋转镜头俯仰角（角度，时间）
        /// </summary>
        /// <param name="role ">  玩家   </param>
        /// <param name="angle ">  角度   </param>
        /// <param name="duration ">  时间   </param>
        public static void camera_rotate_pitch_angle_duration(this Role role, Fix32 angle, Fix32 duration) => game_api.camera_rotate_pitch_angle_duration(role, angle, duration);
        /// <summary>
        /// 旋转镜头俯仰角（角速度，角度）
        /// </summary>
        /// <param name="role ">  玩家   </param>
        /// <param name="angle_speed ">  角速度   </param>
        /// <param name="angle ">  角度   </param>
        public static void camera_rotate_pitch_speed_angle(this Role role, Fix32 angle_speed, Fix32 angle) => game_api.camera_rotate_pitch_speed_angle(role, angle_speed, angle);
        /// <summary>
        /// 旋转镜头俯仰角（角速度，角度）
        /// </summary>
        /// <param name="role ">  玩家   </param>
        /// <param name="angle_speed ">  角速度   </param>
        /// <param name="angle ">  角度   </param>
        public static void camera_rotate_pitch_speed_duration(this Role role, Fix32 angle_speed, Fix32 angle) => game_api.camera_rotate_pitch_speed_duration(role, angle_speed, angle);
        /// <summary>
        /// 旋转镜头导航角（角度，时间）
        /// </summary>
        /// <param name="role ">  玩家   </param>
        /// <param name="angle ">  角度   </param>
        /// <param name="duration ">  时间   </param>
        public static void camera_rotate_yaw_angle_duration(this Role role, Fix32 angle, Fix32 duration) => game_api.camera_rotate_yaw_angle_duration(role, angle, duration);
        /// <summary>
        /// 旋转镜头导航角（角速度，时间）
        /// </summary>
        /// <param name="role ">  玩家   </param>
        /// <param name="angle_speed ">  角速度   </param>
        /// <param name="duration ">  时间   </param>
        public static void camera_rotate_yaw_speed_duration(this Role role, Fix32 angle_speed, Fix32 duration) => game_api.camera_rotate_yaw_speed_duration(role, angle_speed, duration);
        /// <summary>
        /// 旋转镜头导航角（角速度，角度）
        /// </summary>
        /// <param name="role ">  玩家   </param>
        /// <param name="angle_speed ">  角速度   </param>
        /// <param name="angle ">  角度   </param>
        public static void camera_rotate_yaw_speed_angle(this Role role, Fix32 angle_speed, Fix32 angle) => game_api.camera_rotate_yaw_speed_angle(role, angle_speed, angle);
        /// <summary>
        /// 旋转镜头滚角（角度，时间）
        /// </summary>
        /// <param name="role ">  玩家   </param>
        /// <param name="angle ">  角度   </param>
        /// <param name="duration ">  时间   </param>
        public static void camera_rotate_roll_angle_duration(this Role role, Fix32 angle_speed, Fix32 duration) => game_api.camera_rotate_roll_angle_duration(role, angle_speed, duration);
        /// <summary>
        /// 旋转镜头滚角（角速度，时间）
        /// </summary>
        /// <param name="role ">  玩家   </param>
        /// <param name="angle_speed ">  角速度   </param>
        /// <param name="duration ">  时间   </param>
        public static void camera_rotate_roll_speed_duration(this Role role, Fix32 angle_speed, Fix32 duration) => game_api.camera_rotate_roll_speed_duration(role, angle_speed, duration);
        /// <summary>
        /// 旋转镜头滚角（角速度，角度）
        /// </summary>
        /// <param name="role ">  玩家   </param>
        /// <param name="angle_speed ">  角速度   </param>
        /// <param name="angle ">  角度   </param>
        public static void camera_rotate_roll_speed_angle(this Role role, Fix32 angle_speed, Fix32 angle) => game_api.camera_rotate_roll_speed_angle(role, angle_speed, angle);
        /// <summary>
        /// 镜头摇晃xy
        /// </summary>
        /// <param name="role ">  玩家   </param>
        /// <param name="amplitude ">  摇晃幅度   </param>
        /// <param name="speed ">  摇晃速率   </param>
        /// <param name="duration ">  持续时间   </param>
        /// <param name="t ">  摇晃方式   </param>
        public static void camera_shake_xy(this Role role, Fix32 amplitude, Fix32 speed, Fix32 duration, int? t) => game_api.camera_shake_xy(role, amplitude, speed, duration, t);
        /// <summary>
        /// 镜头摇晃z
        /// </summary>
        /// <param name="role ">  玩家   </param>
        /// <param name="amplitude ">  摇晃幅度   </param>
        /// <param name="speed ">  摇晃速率   </param>
        /// <param name="duration ">  持续时间   </param>
        public static void camera_shake_z(this Role role, Fix32 amplitude, Fix32 speed, Fix32 duration) => game_api.camera_shake_z(role, amplitude, speed, duration);
        /// <summary>
        /// 镜头摇晃xy
        /// </summary>
        /// <param name="role ">  玩家   </param>
        /// <param name="amplitude ">  摇晃幅度   </param>
        /// <param name="speed ">  摇晃速率   </param>
        /// <param name="duration ">  持续时间   </param>
        /// <param name="shake_mode ">  摇晃方式   </param>
        public static void camera_shake(this Role role, Fix32 amplitude, Fix32 speed, Fix32 duration, int? shake_mode) => game_api.camera_shake(role, amplitude, speed, duration, shake_mode);
        /// <summary>
        /// 镜头带衰减震动
        /// </summary>
        /// <param name="role ">  玩家   </param>
        /// <param name="amplitude ">  震动幅度   </param>
        /// <param name="decay ">  衰减速率   </param>
        /// <param name="frequency ">  频率   </param>
        /// <param name="duration ">  持续时间   </param>
        /// <param name="shake_type ">  震动方式   </param>
        public static void camera_shake_with_decay(this Role role, Fix32 amplitude, Fix32 decay, Fix32 frequency, Fix32 duration, int? shake_type) => game_api.camera_shake_with_decay(role, amplitude, decay, frequency, duration, shake_type);
        /// <summary>
        /// 镜头限制移动区域
        /// </summary>
        /// <param name="role ">  玩家   </param>
        /// <param name="area ">  限制区域   </param>
        public static void camera_limit_area(this Role role, Area area) => game_api.camera_limit_area(role, area);
        /// <summary>
        /// 镜头限制移动区域
        /// </summary>
        /// <param name="role ">  玩家   </param>
        public static void camera_limit_area_close(this Role role) => game_api.camera_limit_area_close(role);
        /// <summary>
        /// 镜头跟随某个单位
        /// </summary>
        /// <param name="role ">  玩家   </param>
        /// <param name="unit ">  跟随单位   </param>
        /// <param name="offset_x ">  偏移距离x   0</param>
        /// <param name="offset_y ">  偏移距离y   0</param>
        /// <param name="offset_height ">  偏移高度   0</param>
        public static void camera_set_follow_unit(this Role role, Unit unit, int? offset_x, int? offset_y, int? offset_height) => game_api.camera_set_follow_unit(role, unit, offset_x, offset_y, offset_height);

        /// <summary>
        /// 镜头tps跟随某个单位
        /// </summary>
        /// <param name="role ">  玩家   </param>
        /// <param name="unit ">  跟随单位   </param>
        /// <param name="sensitive ">  灵敏度   5</param>
        /// <param name="pitch ">  俯仰角   3</param>
        /// <param name="yaw ">  偏航角   6</param>
        /// <param name="offset_x ">  偏移距离x   0</param>
        /// <param name="offset_y ">  偏移距离y   10</param>
        /// <param name="offset_z ">  偏移高度   1</param>
        /// <param name="distance ">  摄像机距离   13</param>
        public static void camera_set_tps_follow_unit(this Role role, Unit unit, int? sensitive, int? pitch, int? yaw, int? offset_x, int? offset_y, int? offset_z, int? distance) => game_api.camera_set_tps_follow_unit(role, unit, sensitive, pitch, yaw, offset_x, offset_y, offset_z, distance);
        /// <summary>
        /// 取消镜头tps跟随单位
        /// </summary>
        /// <param name="role ">  玩家   </param>
        public static void camera_cancel_tps_follow_unit(this Role role) => game_api.camera_cancel_tps_follow_unit(role);
        /// <summary>
        /// 将玩家相机解除绑定
        /// </summary>
        /// <param name="role ">  玩家   </param>
        public static void camera_cancel_follow_unit(this Role role) => game_api.camera_cancel_follow_unit(role);
        /// <summary>
        /// 设置玩家镜头焦点高度
        /// </summary>
        /// <param name="role ">  玩家   </param>
        /// <param name="y ">  高度   </param>
        /// <param name="move_time ">  时间   Fix32(0.0)</param>
        public static void camera_set_focus_y(this Role role, Fix32 y, Fix32 move_time) => game_api.camera_set_focus_y(role, y, move_time);
        /// <summary>
        /// 设置玩家相机允许移动
        /// </summary>
        /// <param name="role ">  玩家   </param>
        public static void camera_set_move_enable(this Role role) => game_api.camera_set_move_enable(role);
        /// <summary>
        /// 设置玩家相机禁止移动
        /// </summary>
        /// <param name="role ">  玩家   </param>
        public static void camera_set_move_not_enable(this Role role) => game_api.camera_set_move_not_enable(role);
        /// <summary>
        /// 玩家镜头是否正在播放动画
        /// </summary>
        /// <param name="role ">  玩家   </param>
        /// <returns>是否播放动画</returns>
        public static void is_cameraIS_playing_timeline(this Role role) => game_api.is_cameraIS_playing_timeline(role);

        /// <summary>
        /// 播放镜头动画
        /// </summary>
        /// <param name="role ">  玩家   </param>
        public static void play_camera_timeline(this Role role, int? camline_id) => game_api.play_camera_timeline(role, camline_id);
        /// <summary>
        /// 停止播放镜头动画
        /// </summary>
        /// <param name="role ">  玩家   </param>
        public static void stop_camera_timeline(this Role role) => game_api.stop_camera_timeline(role);
    }
}
